home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / os2mb106.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1997-05-20  |  9KB  |  305 lines

  1. /* Recreate objects script.
  2.  * 
  3.  * Generated via Object Desktop Package File 'MBase'.
  4.  * Modified by Marsiglietti Max 1997.
  5.  */
  6.  
  7. /* Register with REXX API extensions. */
  8. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  9. Call SysLoadFuncs
  10. '@cls'
  11.  
  12. /* Get the boot drive location */
  13. OurPath = Value( 'PATH',,'OS2ENVIRONMENT' )
  14. parse var OurPath .";" BootDrv "\OS2;".
  15. BootDrv = strip(BootDrv)
  16. BootDrv = right(BootDrv, 2)
  17.  
  18. curdir = directory()
  19. say "MaxBase installation program for OS/2 Warp."
  20. say "------- ------------ ------- --- ---- -----"
  21. say
  22. say "This installation procedure will create the WPS"
  23. say " objects you will need to use MaxBase and its"
  24. say " C/S counterparts, Sportello and RXDBServer."
  25. say "Also, if this is your first MaxBase installation,"
  26. say " your "bootdrv"\config.sys file will be changed."
  27. say
  28. say "Close this window now to abort,"
  29. say "or press ENTER to proceed with"
  30. say "installation."
  31. Parse Upper Pull Answer
  32. '@start e readme.os2'
  33. '@start e readme.1st'
  34. '@copy mbase.bmp 'BootDrv'\os2\bitmap'
  35. CreateCollision = 'Replace' 
  36.  
  37. InnF=BootDrv'\CONFIG.MBS'
  38. OutF=BootDrv'\CONFIG.SYS'
  39. '@copy 'OutF' 'InnF' >nul'
  40. '@del 'OutF
  41.  
  42. msg.1 = "** No system files changed. **"
  43. msg.2 = "** You can start using MaxBase right now. **"
  44.  
  45. classpathpresent = 0
  46. do until lines(InnF) = 0
  47.  
  48.  InStr = linein(InnF)
  49.  
  50.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") then
  51.   classpathpresent = 1
  52.  
  53.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") & (pos(translate(curdir"\client"), translate(instr)) = 0) then
  54.  do
  55.   instr = strip(instr)
  56.   if right(instr, 1)\=";" then
  57.    instr = instr || ";"
  58.   instr = instr || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  59.   msg.1 =  "** "BootDrv"\Config.sys changed. **"
  60.   msg.2 =  "** You must now restart your computer before using MaxBase. **"
  61.  end
  62.  call lineout outf, instr
  63. end
  64. if classpathpresent=0 then
  65. do
  66.  call lineout outf, "SET CLASSPATH=" || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  67.   msg.1 =  "** "BootDrv"\Config.sys changed. **"
  68.   msg.2 =  "** You must now restart your computer before using MaxBase. **"
  69. end
  70.  
  71. say "Done registering changes to classpath."
  72. say msg.1
  73. say msg.2
  74. Call CreateObjects
  75. Exit
  76.  
  77. CreateObject: procedure
  78.     Parse Arg Class, Title, Location, Setup, Collision
  79.     rc = SysCreateObject( Class, Title, Location, Setup, Collision )
  80.     If rc <> 1 Then
  81.         Say ' > failed to create ['Title' | 'Class'] at location ['Location']'
  82.     return rc
  83.  
  84. CreateObjects:
  85.  
  86. dtop = SysIni(SYSTEM, "FolderWorkareaRunningObjects", "ALL:", dtloc)
  87. say
  88. say "Now going to register the MaxBase folder on the desktop."
  89. if dtloc.0 > 0 then dtop = dtloc.1
  90. say "Please enter your desktop location (ENTER="dtop")"
  91. parse pull dtuserloc .
  92. if dtuserloc \= "" then dtop = dtuserloc
  93.  
  94. rc = CreateObject( 'WPFolder',,
  95.     'MaxBase',,
  96.     '<WP_DESKTOP>',,
  97.     'NOPRINT=YES;'||,
  98.         'DEFAULTVIEW=CONTENTS;'||,
  99.         'ICONPOS=90,75;'||,
  100.         'ICONVIEWPOS=25 25 55 50;'||,
  101.         'SELFCLOSE=1;'||,
  102.         'BACKGROUND='BootDrv'\OS2\BITMAP\mbase.bmp,N,,I,255 255 255;'||,
  103.         'ALWAYSSORT=YES;'||,
  104.         'TREEVIEW=LINES,MINI;'||,
  105.         'FOLDERICONBACKGROUNDCOLOR=255 255 255;'||,
  106.         'ICONTEXTBACKGROUNDCOLOR=255 255 255;'||,
  107.         'ICONFILE=' || curdir || '\ICONS\MAIN_CL.ICO;'||,
  108.         'ICONNFILE=1,' || curdir || '\ICONS\MAIN_OP.ICO;'||,
  109.         'OBJECTID=<MaxBase>',,
  110.     CreateCollision )
  111.  
  112. rc = CreateObject( 'WPFolder',,
  113.     'Docs',,
  114.     '<MaxBase>',,
  115.     'NOPRINT=YES;'||,
  116.         'DEFAULTVIEW=CONTENTS;'||,
  117.         'ICONPOS=85,63;'||,
  118.         'ICONVIEWPOS=25 35 50 30;'||,
  119.         'SELFCLOSE=1;'||,
  120.         'ALWAYSSORT=YES;'||,
  121.         'TREEVIEW=LINES,MINI;'||,
  122.         'ICONFILE=' || curdir || '\ICONS\DOC_CL.ICO;'||,
  123.         'ICONNFILE=1,' || curdir || '\ICONS\DOC_OP.ICO;'||,
  124.         'OBJECTID=<MB_DOCS>',,
  125.     CreateCollision )
  126.  
  127. rc = CreateObject( 'WPShadow',,
  128.     'db_store',,
  129.     '<MaxBase>',,
  130.     'NOPRINT=YES;'||,
  131.         'DEFAULTVIEW=UNKNOWN;'||,
  132.         'HELPPANEL=1277;'||,    
  133.         'SHADOWID=' || curdir || '\db_store;'||,
  134.         'ICONPOS=68,90',,
  135.     CreateCollision )
  136.  
  137.  
  138.   rc = CreateObject( 'WPShadow',,
  139.     'Readme.os2',,
  140.     '<MB_DOCS>',,
  141.     'DEFAULTVIEW=UNKNOWN;'||,
  142.         'HELPPANEL=4082;'||,
  143.         'SHADOWID=' || curdir || '\Readme.os2;'||,
  144.         'ICONPOS=87,19',,
  145.     CreateCollision )
  146.  
  147.  
  148.   rc = CreateObject( 'WPShadow',,
  149.     'Readme.1st',,
  150.     '<MB_DOCS>',,
  151.     'DEFAULTVIEW=UNKNOWN;'||,
  152.         'HELPPANEL=4082;'||,
  153.         'SHADOWID=' || curdir || '\Readme.1st;'||,
  154.         'ICONPOS=87,19',,
  155.     CreateCollision )
  156.  
  157.  
  158.   rc = CreateObject( 'WPShadow',,
  159.     'SportelloApplet.doc',,
  160.     '<MB_DOCS>',,
  161.     'DEFAULTVIEW=UNKNOWN;'||,
  162.         'HELPPANEL=4082;'||,
  163.         'SHADOWID=' || curdir || '\client\SportelloApplet.doc;'||,
  164.         'ICONPOS=87,19',,
  165.     CreateCollision )
  166.  
  167.  
  168.   rc = CreateObject( 'WPShadow',,
  169.     'MaxBase.doc',,
  170.     '<MB_DOCS>',,
  171.     'DEFAULTVIEW=UNKNOWN;'||,
  172.         'HELPPANEL=4082;'||,
  173.         'SHADOWID=' || curdir || '\MaxBase.doc;'||,
  174.         'ICONPOS=87,19',,
  175.     CreateCollision )
  176.  
  177.  
  178.   rc = CreateObject( 'WPShadow',,
  179.     'RXDbase.doc',,
  180.     '<MB_DOCS>',,
  181.     'DEFAULTVIEW=UNKNOWN;'||,
  182.         'HELPPANEL=4082;'||,
  183.         'SHADOWID=' || curdir || '\RXDbase.doc;'||,
  184.         'ICONPOS=87,19',,
  185.     CreateCollision )
  186.  
  187.  
  188.   rc = CreateObject( 'WPShadow',,
  189.     'RXDBclient.doc',,
  190.     '<MB_DOCS>',,
  191.     'DEFAULTVIEW=UNKNOWN;'||,
  192.         'HELPPANEL=4082;'||,
  193.         'SHADOWID=' || curdir || '\Client\RXDBclient.doc;'||,
  194.         'ICONPOS=87,19',,
  195.     CreateCollision )
  196.  
  197.  
  198.   rc = CreateObject( 'WPShadow',,
  199.     'Sportello.doc',,
  200.     '<MB_DOCS>',,
  201.     'DEFAULTVIEW=UNKNOWN;'||,
  202.         'HELPPANEL=4082;'||,
  203.         'SHADOWID=' || curdir || '\Client\Sportello.doc;'||,
  204.         'ICONPOS=87,19',,
  205.     CreateCollision )
  206.  
  207.  
  208.   rc = CreateObject( 'WPProgram',,
  209.       'Open local DB',,
  210.       '<MaxBase>',,
  211.       'NOTDEFAULTICON=YES;'||,
  212.           'NOPRINT=YES;'||,
  213.           'DEFAULTVIEW=RUNNING;'||,
  214.           'ICONPOS=2,6;'||,
  215.           'ASSOCFILTER=*.DAT,*.DBF;'||,
  216.           'EXENAME=' || curdir || '\MAXBASE.CMD;'||,
  217.           'PARAMETERS=%**F;'||,
  218.           'PROGTYPE=WINDOWABLEVIO;'||,
  219.           'MINIMIZED=YES;'||,
  220.           'ICONFILE=' || curdir || '\ICONS\MaxBase.ICO',,
  221.       CreateCollision )
  222.  
  223.   rc = CreateObject( 'WPProgram',,
  224.       'Share DB on the network',,
  225.       '<MaxBase>',,
  226.       'NOTDEFAULTICON=YES;'||,
  227.           'NOPRINT=YES;'||,
  228.           'DEFAULTVIEW=RUNNING;'||,
  229.           'HELPPANEL=15684;'||,
  230.           'ICONPOS=88,82;'||,
  231.           'ICONVIEWPOS=36 76 38 16;'||,
  232.           'ASSOCFILTER=*.DAT;'||,
  233.           'EXENAME=' || curdir || '\server\runserver.cmd;'||,
  234.           'PARAMETERS=/d:%**F /p:[Port?] /l:log.txt /a:[Password? ENTER=none];'||,
  235.           'PROGTYPE=WINDOWABLEVIO;'||,
  236.           'NOAUTOCLOSE=YES;'||,
  237.           'ICONFILE=' || curdir || '\ICONS\RXDBServer.ICO',,
  238.       CreateCollision )
  239.  
  240.   rc = CreateObject( 'WPProgram',,
  241.       'Access a remote DB',,
  242.       '<MaxBase>',,
  243.       'NOTDEFAULTICON=YES;'||,
  244.           'NOPRINT=YES;'||,
  245.           'DEFAULTVIEW=RUNNING;'||,
  246.           'HELPPANEL=15684;'||,
  247.           'ICONPOS=16,6;'||,
  248.           'EXENAME=' || curdir || '\client\runclient.cmd;'||,
  249.           'PARAMETERS=[Host?] [Port?] [Password? ENTER=none];'||,
  250.           'PROGTYPE=WINDOWABLEVIO;'||,
  251.           'MINIMIZED=YES;'||,
  252.           'ICONFILE=' || curdir || '\ICONS\RXDBClient.ICO',,
  253.       CreateCollision )
  254.  
  255. rc = CreateObject( 'WPFolder',,
  256.     'NewDB',,
  257.     '<MaxBase>',,
  258.     'TEMPLATE=YES;'||,
  259.         'DEFAULTVIEW=CONTENTS;'||,
  260.         'HELPPANEL=15685;'||,
  261.         'ICONPOS=54,82;'||,
  262.         'SELFCLOSE=1;'||,
  263.         'ICONVIEWPOS=38 73 33 18;'||,
  264.         'ALWAYSSORT=YES;'||,
  265.         'BACKGROUND=(none),,,C,199 199 199;'||,
  266.         'ICONFILE=' || curdir || '\ICONS\MB_CL.ICO;'||,
  267.         'ICONNFILE=1,' || curdir || '\ICONS\MB_OP.ICO;'||,
  268.         'OBJECTID=<NewDB>',,
  269.     CreateCollision )
  270.  
  271. '@copy 'curdir'\rxdb.dat 'dtop'\MaxBase\NewDB'
  272.  
  273. rc = CreateObject( 'WPUrl',,
  274.     'Get the latest Java 1.02 runtime for OS/2!',,
  275.     '<MaxBase>',,
  276.     'DEFAULTVIEW=CONTENTS;'||,
  277.     'URL=ftp://ftp.hursley.ibm.com/pub/java/fixes/os2/102/runtime.exe;'||,
  278.     'ICONPOS=56,47',,
  279.     CreateCollision )
  280.  
  281.  
  282.   rc = CreateObject( 'WPShadow',,
  283.     'readme.plugins',,
  284.     '<MB_DOCS>',,
  285.     'DEFAULTVIEW=UNKNOWN;'||,
  286.         'HELPPANEL=4082;'||,
  287.         'SHADOWID=' || curdir || '\readme.plugins;'||,
  288.         'ICONPOS=87,19',,
  289.     CreateCollision )
  290.  
  291.   rc = CreateObject( 'WPProgram',,
  292.       'SmartGuide to MaxBase',,
  293.       '<MaxBase>',,
  294.           'NOPRINT=YES;'||,
  295.           'DEFAULTVIEW=RUNNING;'||,
  296.           'HELPPANEL=15684;'||,
  297.           'ICONPOS=16,6;'||,
  298.           'STARTUPDIR=' || curdir || ';' ||,
  299.           'EXENAME=sguide.exe;'||,
  300.           'PARAMETERS=' || curdir || '\mbase.sgs;',,
  301.       CreateCollision )
  302. say "Done registering objects on the Workplace Shell."
  303. say "You should find a new folder on your desktop, called 'MaxBase'."
  304. return
  305.